package com.vhly.ddxdecompiler.dexreader.util;

import java.io.InputStream;
import java.io.OutputStream;

/**
 * Created by IntelliJ IDEA.
 * User: vhly[FR]
 * Date: 2010-2-17
 * Time: 22:49:11
 */
public class StreamUtil {
    public static void close(Object stream){
        if(stream != null){
            try{
                if(stream instanceof InputStream){
                    ((InputStream)stream).close();
                }else if(stream instanceof OutputStream){
                    ((OutputStream)stream).close();
                }
            }catch(Exception ex){

            }
        }
    }
}
